# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

inherit flag-o-matic

DESCRIPTION="Command line sudoku solver and creator."
HOMEPAGE="http://sudognu.sourceforge.net/"
SRC_URI="mirror://sourceforge/sudognu/${P}.tar.gz"
#		http://sudognu.sourceforge.net/5000sym.sdk.zip"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="doc"

DEPEND=">=dev-libs/libharu-2.0.8"
RDEPEND="${DEPEND}"

src_unpack() {
	unpack ${A}
	sed -ie "s:\/local::g" ${S}/Makefile || die "sed failed."
}
src_compile() {
	append-flags -I/usr/include
	emake || die "emake failed."
}

src_install() {
	local docs="COPYING README README_CGI"
	dodir /usr/man/man1
	dodir /usr/bin
	
	make PREFIX=${D}usr install || die "install failed."
	use doc && dodoc ${docs}
	#TODO: CGI
}
